import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import Components from 'unplugin-vue-components/vite'
import {AntDesignVueResolver} from 'unplugin-vue-components/resolvers'
import UnoCSS from 'unocss/vite'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    UnoCSS(),
    Components({
      // 生成component.d.ts配置文件，用于类型提示
      dts: resolve(__dirname,'src/typings/components.d.ts'),
      resolvers:[
        AntDesignVueResolver({importStyle:false})
      ]
    })
  ],
  resolve:{
    alias:{
      '@': resolve(__dirname,'src')
    }
  }
})
